
{% load i18n %}

{% block content %}
<!DOCTYPE html> 
<html> 
    <head> 
    <title>Requests</title> 
    <link rel="stylesheet" href="/static/jquery.mobile-1.0a2/jquery.mobile-1.0a2.min.css" />
    <script src="/static/jquery.min.js"></script>
    <script src="/static/jquery.mobile-1.0a2/jquery.mobile-1.0a2.min.js"></script>
</head> 
<body>

<!-- Home Page -->
<div data-role="page" > 
    <div data-role="header">
        <a href="/courses/ITeach"> back</a><h1>Requests</h1> <a href='/accounts/logout/' rel="external" > logout</a>
    </div> 
    <div data-role="content">
{% if requests %}
<ul data-role="listview" >
{% for request in requests %}
<li>"{{request.sender.username}}" has requested to join "{{request.course.title}}" course  </li><li>  <a href="/courses/acceptreq/{{request.id}}">Accept</a></li> <li> <a href="/courses/rejectreq/{{request.id}}"> Reject</a> </li>
{% endfor %}</ul>
{% else %}
<h2>No requests pending</h2>
{% endif %}
</div> 
</div> 
</body>
</html>

{% endblock %}
